import React from "react"
import ClassCpn from './ClassCpn'

class App extends React.Component {  
  constructor() {
    super();
    this.state = {
      message: "App Component"
    }
  }

  render() {
    const { message } = this.state
    //element对象: 通过jsx编写的代码会被编译成React.createElement，所返回的就是一个React元素

    //return <h2>Hello</h2>
    //return ["abc", "cba", "adc"];
    //return [<h2>Hello</h2>, <h3>World</h3>, <p>你好</p>]
    //return "Hello World"
    
    return (
      <div>
        <h2>{message}</h2>
        <ClassCpn/>
      </div>
    )
  }
}

export default App;
